/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exercises.day02.pt01;

/**
 *
 * @author (jaice)
 * @version 0.1 (may 28, 2012)
 * 
 * b. Write a program that asks for names and displays the initials. 
 * Ask the user for their first name.  Save it in a string variable. 
 * Ask the user for their last name.  Save it in a string variable.
 * Use the substring() method to get the first characters from both the first
 * and last names.  Use the toUpperCase() method to convert them to upper case. 
 * Display the initials to the user.
 * 
 */
public class GetInitials {
    //declare variable

    private String firstName;
    private String lastName;

    /**
     * constructor for GetInitials
     * 
     * @param firstName
     * @param lastName 
     */
    public GetInitials(String firstName, String lastName) {
        this.firstName = firstName;
        this.lastName = lastName;
    }

    /**
     * get first char of first name and last name
     * 
     * @return initials
     */
    public String ReturnInitials() {

        return this.firstName.substring(0,1).toUpperCase() + ". " + this.lastName.substring(0,1).toUpperCase() + ".";
    }
}
